package pl.zmudzinski.jdk.newsletter;

import com.google.inject.AbstractModule;
import com.google.inject.Scopes;
import pl.zmudzinski.jdk.newsletter.publisher.NewsletterPublisher;
import pl.zmudzinski.jdk.newsletter.publisher.NewsletterPublisherImpl;
import pl.zmudzinski.jdk.newsletter.client.NewsletterReader;

import java.util.Observer;

/**
 * @author lukasz.zmudzinski
 */
public class NewsletterModule extends AbstractModule {

    protected void configure() {
        bind(NewsletterPublisher.class).to(NewsletterPublisherImpl.class).in(Scopes.SINGLETON);
        bind(Observer.class).to(NewsletterReader.class).in(Scopes.NO_SCOPE);
    }
}
